import {dictItemUrl} from "@/config/env";
import startDurationTools from "utils/startDurationTools";

export default {
    addBtn: false,
    editBtn: false,
    menu: false,
    header: false,
    align: "center",
    column: [
        {
            type: "input",
            prop: "taskDefName",
            label: "任务名称"
        },
        {
            type: "input",
            prop: "taskHandlerUser.nickName",
            bind: "taskHandlerUser.nickName",
            label: "审批人"
        },
        {
            type: "select",
            label: '审批状态',
            prop: 'handlerState',
            tagProp: {
                20: {type: "success"}
            },
            span: 12,
            dicMethod: "get",
            tag: {},
            dicUrl: dictItemUrl,
            dicQuery: {dictCode: "procTaskHandlerStatus"},
            props: {
                label: 'dictName',
                value: 'dictVal',
            },
            detail: true,
        },
        {
            type: "input",
            prop: "authComment",
            label: "审批意见"
        },
        {
            type: "datetime",
            prop: "createTime",
            label: "任务创建时间",
            format: "YYYY-MM-DD HH:mm:ss"
        },
        {
            type: "datetime",
            prop: "authDateTime",
            label: "审批时间",
            format: "YYYY-MM-DD HH:mm:ss"
        },
        {
            type: "input",
            prop: "durationInMillis",
            label: "耗时",
            formatter: (row, value, column) => {
                return startDurationTools.durationFormat(value);
            }
        },
    ]
}
